
function get1() {

    return new Promise( (resolve,reject) => {

        setTimeout(() => console.log('get1 is a function',arguments),2000);
        resolve(arguments);
    })
}

async function get() {

    const re = await get1('88');
    console.log('re',re);
    console.log('after get1');
    // return {value:"返回值"};

}

// async 函数返回一个promise对象, then()中回调函数的参数为 async函数的返回值；catch() 中回调函数的参数为 async中错误对象；
get().then(res => console.log('res',res)).catch( err => console.log('err',err));
